//实名管理
import http from '@/axios'
import {handleError} from "vue";
import {handleSuccess} from "@/api/index.js";

/**
 * 实名管理相关API
 */
export const realnameAPI = {

    // 获取待审核实名认证列表
    getPendingAuthList: (params) => http.get('/api/user/auth-pending-list', {params})
        .then(res => handleSuccess(res, '获取待审核列表成功'))
        .catch(error => handleError(error, '获取待审核列表失败')),

    // 审核实名认证
    verifyAuth: (data) => http.post('/api/user/auth-verify', data)
        .then(res => handleSuccess(res, '审核操作成功'))
        .catch(error => handleError(error, '审核操作失败'))
}

// 保留原有导出
export default realnameAPI
